home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / HELLSRC.ZIP / MODE60.RT < prev    next >
Text File  |  1993-10-14  |  5KB  |  103 lines

  1. public  _mode60
  2. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  3. ; Set 60Hz VGA refresh tweaked mode
  4. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  5. Horizontal_Total                        = 00095
  6. Horizontal_Display_End                  = 00079
  7. Start_Horizontal_Blanking               = 00080
  8. End_Horizontal_Blanking                 = 00000
  9. Start_Horizontal_Retrace                = 00084
  10. End_Horizontal_Retrace                  = 00000
  11.  
  12. Vertical_Total                          = 00540;00541;00447;00541
  13. Vertical_Display_End                    = 00399;00399;00399;00431
  14. Start_Vertical_Blanking                 = 00443;00400;00406;00439
  15. End_Vertical_Blanking                   = 00021;00001;00185;00029
  16. Start_Vertical_Retrace                  = 00461;00454;00412;00482
  17. End_Vertical_Retrace                    = 00014;00000;00014;00014
  18.  
  19. Line_Compare                            = 01023
  20. Display_Enable_Skew                     = 00000
  21. Horizontal_Retrace_Delay                = 00000
  22.  
  23. Byte_Panning                            = 00000
  24. Preset_Row_Scan                         = 00000
  25. Maximum_Scan_Line                       = 00001
  26. Start_Address                           = 00000
  27. Offset_Register                         = 00040
  28.  
  29. Two_2_Four                              = 00000
  30. Bandwidth                               = 00000
  31. Count_By_Four                           = 00000
  32. Double_Word_Mode                        = 00000
  33. Hardware_Reset                          = 00001
  34. Word_Byte_Mode                          = 00001
  35. Address_Wrap                            = 00001
  36. Count_By_Two                            = 00000
  37. Horizontal_Retrace_Select               = 00000
  38. Select_Row_Scan_Counter                 = 00001
  39. Compatibility_Mode_Support              = 00001
  40.  
  41. mode60regs:
  42. temp = (End_Vertical_Retrace AND 1111b)
  43. temp = temp + ((Bandwidth AND 1) SHL 6)
  44.                 db      11h, temp
  45.                 db      00h, Horizontal_Total
  46.                 db      01h, Horizontal_Display_End
  47.                 db      02h, Start_Horizontal_Blanking
  48. temp = End_Horizontal_Blanking AND 11111b
  49. temp = temp + ((Display_Enable_Skew AND 11b) SHL 5)
  50. temp = temp + 128
  51.                 db      03h, temp
  52.                 db      04h, Start_Horizontal_Retrace
  53. temp = End_Horizontal_Retrace AND 11111b
  54. temp = temp + ((Horizontal_Retrace_Delay AND 11b) SHL 5)
  55. temp = temp + ((End_Horizontal_Blanking AND 100000b) SHL 2)
  56.                 db      05h, temp
  57.                 db      06h, (Vertical_Total AND 255)
  58. temp = ((Start_Vertical_Retrace AND 512) SHR 2) + ((Start_Vertical_Retrace AND 256) SHR 6)
  59. temp = temp + ((Vertical_Display_End AND 512) SHR 3) + ((Vertical_Display_End AND 256) SHR 7)
  60. temp = temp + ((Vertical_Total AND 512) SHR 4) + ((Vertical_Total AND 256) SHR 8)
  61. temp = temp + ((Line_Compare AND 256) SHR 4)
  62. temp = temp + ((Start_Vertical_Blanking AND 256) SHR 5)
  63.                 db      07h, temp
  64. temp = (Preset_Row_Scan AND 11111b)
  65. temp = temp + ((Byte_Panning) SHL 5)
  66.                 db      08h, temp
  67. temp = (Maximum_Scan_Line AND 11111b)
  68. temp = temp + ((Start_Vertical_Blanking AND 512) SHR 4)
  69. temp = temp + ((Line_Compare AND 512) SHR 3)
  70. temp = temp + ((Two_2_Four AND 1) SHL 7)
  71.                 db      09h, temp
  72.                 db      0Ch, (Start_Address SHR 8)
  73.                 db      0Dh, (Start_Address AND 255)
  74.                 db      10h, (Start_Vertical_Retrace AND 255)
  75.                 db      12h, (Vertical_Display_End AND 255)
  76.                 db      13h, Offset_Register
  77. temp = ((Count_By_Four AND 1) SHL 5)
  78. temp = temp + ((Double_Word_Mode AND 1) SHL 6)
  79.                 db      14h, temp
  80.                 db      15h, (Start_Vertical_Blanking AND 255)
  81.                 db      16h, (End_Vertical_Blanking AND 255)
  82. temp = ((Hardware_Reset AND 1) SHL 7)
  83. temp = temp + ((Word_Byte_Mode AND 1) SHL 6)
  84. temp = temp + ((Address_Wrap AND 1) SHL 5)
  85. temp = temp + ((Count_By_Two AND 1) SHL 3)
  86. temp = temp + ((Horizontal_Retrace_Select AND 1) SHL 2)
  87. temp = temp + ((Select_Row_Scan_Counter AND 1) SHL 1)
  88. temp = temp + (Compatibility_Mode_Support AND 1)
  89.                 db      17h, temp
  90.                 db      18h, (Line_Compare AND 255)
  91.  
  92. ;─────────────────────────────────────────────────────────────────────────────
  93. _mode60:
  94.         call _modeX
  95.         push ecx esi dx
  96.         mov dx,3d4h
  97.         mov esi,offset mode60regs
  98.         mov ecx,21
  99.         rep outsw
  100.         pop dx esi ecx
  101.         ret
  102.  
  103.